package com.test.p21command.example01;

public class ConcreteCommand implements  Command{

    /**
     * 命令真正的执行者
     */
    private Receiver receiver;

    public ConcreteCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        //执行前后可以加很多操作，如记录日志
        receiver.action();
    }
}
